<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../../Templates/SubFolderTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    
    <ui:define name="head-title">
        <title>View All Customer Payments | Merlion's ERP System</title>
    </ui:define>
    
    <ui:define name="content">
            <h:form prependId="false">
            <p:panel id="panel" header="View All Customer Payments"> 
                <p:ajaxStatus style="width:16px;height:16px;">   
                    <f:facet name="start">   
                        <p:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                    </f:facet> 
 
                    <f:facet name="complete">   
                        <h:outputText value="" />   
                    </f:facet>   
                </p:ajaxStatus> 
            
                <p:messages /> 
                
                <p:dataTable var="customerPayment" value="#{viewAllCustomerPaymentsManagerBean.customerPayments}"
                             dynamic="true" paginator="true" emptyMessage="No Customer Payments" style="width: 50%;">
                    <p:column sortBy="#{customerPayment.customerPaymentId}">
                        <f:facet name="header">
                            <h:outputText value="Customer Payment ID"/>
                        </f:facet>
                        <h:outputText value="#{customerPayment.customerPaymentId}"/>
                    </p:column>

                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Date"/>
                        </f:facet>
                        <h:outputText value="#{customerPayment.customerPaymentDate}" style="width: 150px"/>
                    </p:column>
                    
                     <p:column>
                        <f:facet name="header">
                            <h:outputText value="Amount"/>
                        </f:facet>
                         <h:outputText value="#{customerPayment.customerPaymentAmount}" style="width: 150px"/>
                    </p:column>
                    
                     <p:column>
                        <f:facet name="header">
                            <h:outputText value="Sale Order ID"/>
                        </f:facet>
                         <h:outputText value="#{customerPayment.customerInvoice.saleOrder.id}" style="width: 150px"/>
                    </p:column>
                    
                    
                    </p:dataTable>
                </p:panel>
        </h:form>
    </ui:define>
</ui:composition>

